package ooday01;

public class CarTest {
    public static void main(String[] args) {
        //创建一个汽车对象
        Car bm = new Car();
        //访问成员变量
        bm.brand = "宝马";
        bm.color = "黑色";
        bm.price = 500000;
        bm.capacity = 5;
        //调用方法
        bm.start();
        bm.run();
        bm.stop();
        System.out.println("------------------");
        Car bc = new Car();
        bc.brand = "奔驰";
        bc.color = "白色";
        bc.price = 600000;
        bc.capacity = 5;
        bc.start();
        bc.run();
        bc.stop();
        System.out.println("------------------");
        Car bj=new Car();
        bj.start();
        bj.run();
        bj.stop();
        System.out.println("------------------");

    }

}
